<template>
<div>
  <div>
    <van-nav-bar
        title="我的账号"
        left-arrow
        @click-left="onClickLeft"
    />
  </div>
  <div style="margin-top: 15px;background-color: white">
    <van-cell-group>
      <van-cell title="手机号" :value="userMsg.phone" style="text-align: left;height: 60px" center/>
    </van-cell-group>
    <van-cell-group>
      <van-cell title="真实姓名" :value="userMsg.name==''?'未认证':userMsg.name" style="text-align: left;height: 60px" center/>
    </van-cell-group>
    <van-cell-group>
      <van-cell title="所属公司" :value="userMsg.postCompany==null?'未认证':userMsg.postCompany" style="text-align: left;height: 60px" center/>
    </van-cell-group>
  </div>
</div>
</template>

<script>
export default {
  data() {
    return {
      userMsg:{}
    }
  },
  mounted() {
    let parse = JSON.parse(localStorage.getItem('login'));
    if(parse!=null||parse!=''){
      this.userMsg=parse;
    }
  },
  methods: {
    onClickLeft() {
      this.$router.push({
        path: '/mine'
      })
    }
  }
}
</script>

<style  scoped>
body{
  width: 100%;
  height: 100%;
  background-color: #f5f5f5;
}
</style>
